<template>
  <div :class="$style.spinner">
    <span v-for="x, i in names" :key="x" :style="{ '--t-d': `${i * 0.25}s` }">{{ x.toUpperCase() }}</span>
  </div>
</template>

<script
  lang="ts"
  setup
  name="AnimateText"
>
const names = computed(() => 'loading'.split(''))
</script>

<style module lang="scss">
@keyframes loading6454 {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.spinner {
  font-size: 10px;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 2px;
  color: #f5f5f5;
  filter: drop-shadow(0 0 10px);
  display: flex;
  justify-content: center;
  align-items: center;

  span {
    animation: loading6454 1.75s ease infinite;
    animation-delay: var(--t-d);
  }
}
</style>
